A browser displays webpages on a terminal. A user may access desired websites through a browser to obtain corresponding information.
The process how a browser accesses a website mainly comprises the following steps: 1. the terminal acquires the web address typed by a user on the browser; 2. the terminal determines a server corresponding to the web address; 3. the terminal establishes a transport layer connection with the server; 4. the terminal sends a network request to the server through an established transport layer connection; and 5. the terminal receives webpage data of the website sent by the server, and renders the webpage according to the webpage data. By performing the above steps, a browser can access the content of a target website. Since the access process needs to go through the above series of steps, the user has to wait for a while to view the webpage of the target website on the browser after the user types the web address in the browser.
To shorten the waiting time of a user in the website access process, currently available technical solutions for pre-reading webpage contents mainly comprise the following steps: acquiring historical access data of web address on a terminal, the history data at least comprising web address access weights and web address historical access times; based on the web address access weights and web address historical access times, calculating an access probability coefficient for a web address, and selecting web addresses with access probability coefficients greater than a threshold; pre-reading contents of webpages corresponding to the selected predetermined number of web addresses; caching the pre-read webpage contents in the browser of the terminal. Some problems need to be addressed in the current techniques.
Since the pre-read webpage contents contain a lot of data, e.g. webpage main documents, CSS style, JS script and other data, the network data for acquiring these data will be wasted if the pre-read webpage contents have not been used throughout the website access process. Moreover, it requires plentiful system resources, such as memory and processor, to store these webpage contents. As a result, the existing method of pre-reading webpage contents will take up a relatively great amount of network data and consume a lot of system resources.